$(document).ready(function(){
    
module("Integration-Printing");

test("printing numbers", function() {
  FT.check("0 .", "0");
  FT.check("1 .", "1");
  FT.check("1.1 .", "1.1");
});

test("printing numbers", function() {
  FT.check("[] .", "[]");
  FT.check("[1] .", "[1]");
});

module("Integration-ControlOperations");

test("ifte", function() {
  FT.check("[1] [1 .] [2 .] ifte", "1");
});

module("Integration-Other");

test("native name redefinition", function() {
  FT.check("1 2 +; + = .; +", "3");
});

test("(program) recip", function() {
  FT.check("recip = dup [0 eq] [0] [1 swap /] ifte; 0.2 recip .", "5");
});

test("(program) abs", function() {
  FT.check("abs = dup [0 <] [0 swap -] [] ifte; -42 abs .","42");
  FT.check("abs2 = 0 swap dup [[0 >=] [+] [-] ifte] apply; -33 abs2 .","33");
});

test("(program) fibonacci", function() {
  FT.check("fib = dup [1 <=] [] [dup 1 - fib swap 2 - fib +] ifte; 10 fib .", "55");
});

});